// ex4_9.cpp
#include <iostream>
#include <cstring>

int main()
{
    using namespace std;
    struct CandyBar
    {
      char brand[20];
      float weight;
      int calori;
    };

    CandyBar *snack = new CandyBar;
    cout << "Enter the snack brand: ";
    cin.getline(snack->brand, 20);
    snack->brand[strlen(snack->brand)] = '\0';
    cout << "Enter the snack weight: ";
    cin >> snack->weight;
    cout << "Enter the sanck calori: ";
    cin >> snack->calori;


    cout << "CandyBar snack is: \n";
    cout << " snack brand is: " << snack->brand << endl;
    cout << " snack weight is: " << snack->weight << endl;
    cout << " snack calori is: " << snack->calori << endl;
    delete snack;
    return 0;
}
